#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:6_fibonacci.py
# author:张世航
# datetime:2024/10/31 19:23
# software: PyCharm
"""
this is function  description 
"""
# import module your need

# 6  定义一个函数, 打印输出n以内的斐波那契数列;

def fibonacci(n):
    a, b = 0, 1
    fib_sequence = []
    while a < n:
        fib_sequence.append(a)
        a, b = b, a + b
    return fib_sequence

# 用户输入
n = int(input("请输入一个数字 n，输出 n 以内的斐波那契数列："))
print("斐波那契数列:", fibonacci(n))